Skip to content

fix: configure PostgreSQL pool limits - #126

Merged
nanaf6203-bit merged 1 commit into
StellarTips:mainfrom
jamilahmadzai:feature/db-pool-tuning-57
Jul 17, 2026
Merged

fix: configure PostgreSQL pool limits#126
nanaf6203-bit merged 1 commit into
StellarTips:mainfrom
jamilahmadzai:feature/db-pool-tuning-57

Conversation

@jamilahmadzai

Copy link
Copy Markdown
Contributor

Summary

  • configure TypeORM runtime and migration data sources with explicit PostgreSQL pool settings from DB_POOL_SIZE, capped at 20 connections per instance
  • add idle/acquire timeouts, 1s slow-query warnings, and a warn-level pool saturation monitor for queued or fully busy pools
  • document pool tuning and add a k6 /health/ready load test that exercises the database-backed readiness path at 2x the profile-read baseline

Validation

  • npm ci
  • npm test -- config/database-pool.config.spec.ts config/postgres-pool-monitor.spec.ts --runInBand --coverage --collectCoverageFrom=config/database-pool.config.ts --collectCoverageFrom=config/postgres-pool-monitor.ts (100% line coverage on changed config/monitor files)
  • npm test -- --runInBand (115 tests)
  • npm run build
  • npm run lint
  • node --check test/load/db-pool-readiness.js
  • git diff --check

Closes #57

Bounty: GrantFox OSS campaign for issue #57

@nanaf6203-bit
nanaf6203-bit merged commit 6d0b691 into StellarTips:main Jul 17, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure PostgreSQL connection pooling for production load

2 participants